<template>
  <div>
    <h2>数据统计</h2>
    <div ref="chartRef" class="chart-container"></div>
  </div>
</template>

<script setup>
import { onMounted, ref } from 'vue'
import * as echarts from 'echarts'
const chartRef = ref(null)
// 页面挂载后初始化 ECharts
onMounted(() => {
  const chart = echarts.init(chartRef.value)
  chart.setOption({
    title: { text: '用户增长趋势' },
    xAxis: { data: ['1月','2月','3月','4月','5月'] },
    yAxis: {},
    series: [{ type: 'line', data: [5, 20, 36, 10, 20] }]
  })
})
</script>

<style scoped>
.chart-container {
  width: 600px;
  height: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px 0 rgba(64,158,255,0.04);
  padding: 24px;
  margin: 0 auto;
}
</style> 